{% extends 'TopxiaWebBundle::layout.html.twig' %}

{% block title %}{{'微信支付'|trans}} - {{ parent() }}{% endblock %}
{% block esBar %}{% endblock %}
{% set script_controller = 'pay/wxpay-roll' %}
{% block content %}

  <div class="es-section section-wxpay">
    <ul class="es-step es-step-3 clearfix">
      <li class="done"><span class="number"><i class="es-icon es-icon-done"></i></span>{{'订单确认'|trans}}</li>
      <li class="doing"><span class="number">2</span>{{'微信支付'|trans}}</li>
      <li><span class="number">3</span>{{'订单完成'|trans}}</li>
    </ul>
    <div class="order-pay-body">
      <div class="alert alert-success alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        {{'订单已提交，请在４８小时内完成支付！逾期订单将被取消。'|trans}}
      </div>
      <div class="pay-qrcode-body clearfix">
        <div class="qrcode-img">
          <img class = 'img-responsive img-js' src="{{ path('common_qrcode',{text:url}) }}"  data-url="{{ path('wxpay_roll',{order:order}) }}" 
          data-goto="{% if order.targetType|default(null) and order.targetType == 'coin' %} {{ path('my_coin') }}{% else %}{{ path('pay_success_show',{id:order['id']}) }}{% endif %}">
          <div class="text-qrcode hidden-xs">
            {{'请使用微信扫一扫'|trans}}<br>{{'扫描二维码支付'|trans}}
          </div>
          <div class="text-qrcode visible-xs">
            {{'请长按二维码支付'|trans}}
          </div>
        </div>
        <div class="qrcode-img-two hidden-xs">
          <img class="img-responsive" src="{{asset('assets/v2/img/pay_phone.jpg')}}" alt="">
        </div>
      </div>
      <div class="pay-qrcode-footer">
        <a href="{% if order.targetType|default(null) %} {{ path('pay_center_show',{sn:order['sn'],targetType:order['targetType']}) }} {% else %}{{ path('my_coin_buy') }} {% endif %} " class="mrl"><i class="es-icon es-icon-arrowback mrs"></i>{{'选择其他支付方式'|trans}}</a>
        {{'应付金额：'|trans}}<span class="pay-rmb">¥{{order['amount']}}</span>
      </div>
    </div>
  </div>
{% endblock %}